The present invention relates to a method of making environmental programs for testing the software built in a plurality of input/output devices making up a computer system, or more in particular to a method of making an application-specific hardware simulator for testing/debugging by simulation the software for embedded system with a general-purpose computer different from a target machine.
The conventional test environment programs for testing the software built in a plurality of subsystems making up a computer system are described, for example, in "An exchange speech path subsystem simulator as a debugging tool for switching program" H. Nakamura, et al., The Institute of Electronics, Information and Communication Engineers of Japan, Technical Reports SSE 89-163, pp. 1-6. More specifically, this thesis discloses environmental programs comprised of an MPU simulator operated as a subsystem for executing a testee program, an application-specific hardware simulator for simulating the behavior of other subsystems and a bus interface module engaged in the communication between them.
A conventional technique for preparing an MPU simulator according to the type of MPU is disclosed in "Gong Jiemin et al., A Tool to Generate DEBUG Program of Arbitrary Type Microprocessors, IEEE Computer Society Press, Proceedings of COMPAC '89, pp. 543-547. As described in this publication, techniques are known for generating an MPU simulator from the MPU definition information including the behavior of MPU against instruction set.
If test environmental programs described in the thesis of Nakamura are to be constructed, it is necessary for the user to collect the information required for constructing test environmental programs from the hardware specification of a system in which testee programs are embedded. For this purpose, the first problem is that the system must be fully understood by the user. The second problem is that the user is required to construct environmental programs by himself based on the information collected, and the third problem is that it is impossible to reuse the whole or part of the test environmental programs thus constructed.
A test environmental programs for simulating the behavior of an I/O device occupying an important position in a plurality of subsystems included in a computer system is disclosed by JP-A-62-274436. The simulator disclosed in this publication comprises a simulator including an application-specific hardware simulator for simulating the behavior of the I/O device and an I/O monitor which simulates the bus-line between MPU and I/O devices for controlling the execution of an application-specific hardware simulator, thus executing the software for performing the behavior logically equivalent to an actual computer system. The simulation system disclosed in the above-mentioned publication comprises a MPU simulator including a command control facility, an instruction execution facility, an interrupt accept facility, a parallel execution facility, a memory I/O facility and a memory facility, and an application-specific hardware simulator including an I/O monitor, I/O models and an I/O file. Further, the I/O monitor is comprised of a command processing facility, an I/O model execution control facility, a DMA control facility, an interrupt control facility, a real time management facility and an I/O file I/O facility. The I/O models describing the control behavior for individual I/O devices and an I/O file for collectively managing the I/O data are controlled thereby to activate the I/O models by an I/O instruction. As a result, the behavior equivalent to those of an actual computer system such as the DMA transfer between the memory facility and the I/O models, the interruption of the MPU from the I/O models and the parallel operation of the program and the I/O models are executed.
As described in IEEE Design & Test of Computers, Vol. 9, No. 2, June 1992, pp. 6-7, on the other hand, the recent trend is increasingly toward the use of the HDL (Hardware Description Language) as a language for supporting the hardware design. The hardware description language, which is widely used as a design support technique for the computer hardware, is classified into the specification description for expressing the facilities and performance conditions, the behavior description for expressing the manner in which the component elements (such as a register and an adder) are operated, and the structure description for expressing the connection between the component elements (gate level to block level).
In the conventional test environmental programs, in order to provide the general-purpose properties of the simulator, the I/O device program contained in the simulator is rewritten each time the specification of the system (I/O devices) intended for simulation is changed. If the I/O device program is to be rewritten, however, it is indispensable for the person who prepares the application-specific hardware simulator to fully understand the hardware specification of the I/O devices. This requires a great labor and poses the problem of a considerable burden imposed on the user after the specification change.